import requests

debug = True
base_url = "https://online500.tkhealthcare.com/"

if debug:
    base_url = "https://online500.tkhealthcare.com/"
else:
    base_url = "https://online.tkhealthcare.com/"

print("android  方法  queryRoomInfoBySN")
sn = "952005H6726001189975"
url = base_url + "ccloudapp/userCare/queryRoomInfoBySN"
params = {"sn": sn}
res = requests.get(url, params=params,timeout=10)
print("获取房间信息：=====================")
print("code = ", res.status_code)
print("msg", res.json())
print("\n")


print("android  方法  getRoomAndResidentInfo")
url = base_url + "ccloudapp/resident/queryUserInfoBySN"
res = requests.get(url, params=params, timeout=10)
print("获取用户信息信息：=====================")
print("code = ", res.status_code)
print("msg", res.json())
print("\n")


print("android  方法  getTopicList")
url = base_url + "cbp/smartSpeakersHomepageConfig/list"
head = {"Content-Type": "application/json", "charset": "utf-8", "Content-Length": "125"}
params = {
    "configCategory": "",
    "configStatus": "1",
    "configType": "0",
    "deleteFlag": "1",
    "pageSize": 1000,
    "pageType": "new",
    "parkName": "BJYY",
}
res = requests.post(url, headers=head, json=params, timeout=10)
print("获取首页卡片信息：=====================")
print("code = ", res.status_code)
print("msg", res.json())
print("\n")


print("android  方法  getGoodMorningAllocation")
url = base_url + "cbp/morningWordsManage/selectClosedBySN"
params = {"sn": sn}
res = requests.get(url, params=params, timeout=10)
print("获取早安问候的配置=====================")
print("code = ", res.status_code)
print("msg", res.json())
print("\n")


print("android  方法  targetedReachDetail")
url = base_url + "cbp/targetedReach/plan/getById"
params = {"id": 100}
res = requests.get(url, params=params)
print("查询触达计划弹框内容详情=====================")
print("code = ", res.status_code)
print("msg", res.json())
print("\n")
